//
//  NSString+LRXFontMaxSize.m
//  路人侠
//
//  Created by zhangxulong on 3/12/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "NSString+LRXStringCategory.h"

@implementation NSString (LRXStringCategory)
- (CGSize) sizeWithMaxSize:(CGSize)maxSize fontSize:(CGFloat)fontSize
{
    return [self boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:fontSize]} context:nil].size;
}

@end
